package com.ihg.hiex.admin.dao.session;

import java.util.List;

import com.demo2do.core.persistence.annotation.Dao;
import com.demo2do.core.persistence.annotation.Query;
import com.demo2do.core.persistence.annotation.Variable;
import com.ihg.hiex.entity.data.notice.EmailTemplate;

/**
 *
 * @author Ark
 *
 */
@Dao("hibernate")
public interface EmailTemplateDao {

    /**
     * @return
     */
    @Query("FROM EmailTemplate WHERE disabled = false")
    public List<EmailTemplate> list();
    
    /**
     * @param code
     * @return
     */
    @Query("FROM EmailTemplate WHERE disabled = false AND code = :code")
    public EmailTemplate load(@Variable("code") String code);
    
}
